﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="http://IcelandicOnlineBanking/2010/06/01/CommonTypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ct="http://IcelandicOnlineBanking/2010/06/01/CommonTypes" elementFormDefault="qualified" attributeFormDefault="unqualified" id="CommonTypes">
  <xs:simpleType name="BatchNumber">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Batch Number</xs:documentation>
      <xs:documentation xml:lang="is-IS">Númer bunka</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z0-9]{4}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Transaction">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Transaction key</xs:documentation>
      <xs:documentation xml:lang="is-IS">Færslulykill</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:maxLength value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Reference">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Reference number</xs:documentation>
      <xs:documentation xml:lang="is-IS">Tilvísun</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:maxLength value="16" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CategoryCode">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Category code</xs:documentation>
      <xs:documentation xml:lang="is-IS">Textalykill</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:maxLength value="2" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="BillNumber">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Bill number</xs:documentation>
      <xs:documentation xml:lang="is-IS">Seðilnúmer</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value=".{0,7}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Amount">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Amount</xs:documentation>
      <xs:documentation xml:lang="is-IS">Upphæð</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:fractionDigits value="2" />
      <xs:pattern value="-?\d*(\.\d+)?" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CurrencyAmount">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">An amount used to indicate a foreign currency, where the decimal notation has to be more accurate.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Gjaldeyrisupphæð, notuð þar sem nauðsyn er á fleiri aukastöfum en notað er í íslenskri krónu.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:fractionDigits value="6" />
      <xs:pattern value="-?\d*(\.\d+)?" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Status">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Enumerates the possible status of Accounts.  Based on ELYK codes.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Ástand reiknings.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="Open" />
      <xs:enumeration value="Closed" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PersonID">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Icelandic person identification numbers..</xs:documentation>
      <xs:documentation xml:lang="is-IS">Kennitala.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{10}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CountryCode">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">The values are based on the ISO-3166 two-letter country identifiers.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Gildin eru byggð á tveggja stafa ISO-3166 landskóðum.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z]{2}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="CurrencyCode">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">The values are based on the ISO-4217 three-letter currency identifiers, but restricted to those used in Icelandic currency accounts.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Gildin eru byggð á þriggja stafa ISO-4217 landskóðum, en takmarkað við þá kóða sem notaðir eru í íslenskum gjaldeyrisreikningum.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[A-Z]{3}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="AccountID">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Account ID's consist of bank ([0-9]{4}), ledger ([0-9]{2}) and account ([0-9]{6}) numbers that together uniquely identify an account.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Reikningsnúmer samanstanda af útibúsnúmeri ([0-9]{4}), höfuðbók ([0-9]{2}) og reikning ([0-9]{6}) sem mynda einkvæmt auðkenni reiknings.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{12}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Bank">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">A 4 letter number (padded with zeros if necessary) that identifies a particular branch. Icelandic: Bankanúmer eða útibúsnúmer.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Bankanúmer eða útibúsnúmer.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:pattern value="[0-9]{4}" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="IBAN">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">International Bank Account Number.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Alþjóðlegt reikningsnúmer.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:length value="34" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PhoneNumberString">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Phone number.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Símanúmer.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:maxLength value="20" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PhoneCountryCode">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">International dialing code.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Landsnúmer fyrir símanúmer.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:length value="3" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="AddressLine">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Address.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Heimilisfang.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:maxLength value="35" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="PostCode">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Postal code.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Póstnúmer.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="0" />
      <xs:maxLength value="50" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ErrorCode">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">An error code that occurred during an operation.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Auðkenni villu sem að kom upp í aðgerð.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="0" />
      <xs:maxLength value="50" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ErrorMessage">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">A description of an error that occurred.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Lýsing á villu sem kom upp í aðgerð.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="Email">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Email address.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Tölvupóstfang.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="6" />
      <xs:maxLength value="60" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ExchangeRate">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Exchange rate</xs:documentation>
      <xs:documentation xml:lang="is-IS">Gengi gjaldmiðils.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:fractionDigits value="6" />
      <xs:pattern value="-?\d*(\.\d+)?" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Language">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">ISO 639 Language Codes (three letters, e.g. ISL, ENG). See: http://www.loc.gov/standards/iso639-2/iso639jac.html.</xs:documentation>
      <xs:documentation xml:lang="is-IS">ISO 639 tungumálakóðar (3 stafir, t.d. ISL og ENG). Sjá einnig:http://www.loc.gov/standards/iso639-2/iso639jac.html.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:length value="3" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="PhoneNumber">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Phone number</xs:documentation>
      <xs:documentation xml:lang="is-IS">Símanúmer.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="CountryCode" type="ct:PhoneCountryCode">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">The country code for the phone number. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Landsnúmer símanúmersins.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Number" type="ct:PhoneNumberString">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Phone number. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Símanúmer.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Address">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Address used in the sending of receipts.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Heimilisfang. Notað í sendingu kvittana.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Name" type="ct:AddressLine">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Name of resident/recipient. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Nafn íbúa/viðtakanda.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AddressLine1" type="ct:AddressLine">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">First part of address. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Fyrri hlut heimilisfangs.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="AddressLine2" type="ct:AddressLine" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Second part of address. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Seinni hlut heimilisfangs.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PostCodeNumber" type="ct:PostCode">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Postal code. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Póstnúmer.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="City" type="ct:AddressLine">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Place of residence, be it city, town, etc. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Staður þar sem viðkomandi býr, hvort sem það er borg, sveitarfélag o.s.frv.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Region" type="ct:AddressLine" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">The country region where the person lives. </xs:documentation>
          <xs:documentation xml:lang="is-IS">Landssvæði sem viðkomandi býr á.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Country" type="ct:CountryCode">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Country.</xs:documentation>
          <xs:documentation xml:lang="is-IS">Land.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Error">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">An error code and message describing what went wrong during with the operation.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Villa og villuboð sem lýsa því hvað misfórst í framkvæmd aðgerðar.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Code" type="ct:ErrorCode">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">An error that occured during the operation. Varies between banks.</xs:documentation>
          <xs:documentation xml:lang="is-IS">Villukóði sem að kom upp við framkvæmd aðgerðar. Mismunandi eftir bönkum.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Message" type="ct:ErrorMessage">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">An error message describing an error that occured during the operation. Varies between banks.</xs:documentation>
          <xs:documentation xml:lang="is-IS">Villuboð sem að lýsa villu sem kom upp við framkvæmd aðgerðar. Mismunandi eftir bönkum.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="OperationID">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Operation ID's are returned when calling certain synchronous and asynchronous methods, making possible to track the results of the request both programmatically and manually.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Auðkenni aðgerðar sem er skilað í lok ákveðinna aðgerða, sem gerir það mögulegt að rekja niðurstöðu þeirra bæði vélrænt og í höndunum.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string" />
  </xs:simpleType>
  <xs:simpleType name="Percentage4">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Prósentur, fjórir aukastafir, (dráttarvextir).</xs:documentation>
      <xs:documentation xml:lang="is-IS">Percentage where 4 digits are allowed behind the decimal point as in default interests.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0" />
      <xs:maxExclusive value="1000.0000" />
      <xs:totalDigits value="7" />
      <xs:fractionDigits value="4" />
      <xs:pattern value="-?\d*(\.\d+)?" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Percentage2">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">Percentage where 2 digits are allowed behind the decimal point.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Prósentur, tveir aukastafir, vanskilagjald og afsláttur.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:decimal">
      <xs:minInclusive value="0" />
      <xs:maxExclusive value="100.00" />
      <xs:totalDigits value="4" />
      <xs:fractionDigits value="2" />
      <xs:pattern value="-?\d*(\.\d+)?" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="CurrencyRate">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">A rate for currency, at the time the timestamp states.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Gengi gjaldmiðils, á þeim tíma sem tímastimpillinn segir til um.</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="CurrencyCode" type="ct:CurrencyCode">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Currency.</xs:documentation>
          <xs:documentation xml:lang="is-IS">Mynt.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SellingRate" type="xs:decimal" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">The selling rate for the currency.</xs:documentation>
          <xs:documentation xml:lang="is-IS">Sölugengi gjaldmiðilsins.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="BuyingRate" type="xs:decimal" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">The buying rate for the currency.</xs:documentation>
          <xs:documentation xml:lang="is-IS">Kaupgengi gjaldmiðilsins.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CustomsRate" type="xs:decimal" minOccurs="0">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Customs rate. Only returned when specifically asked for</xs:documentation>
          <xs:documentation xml:lang="is-IS">Tollgengi. Bara skilað þegar spurt var um tollgengi.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TimeStamp" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation xml:lang="en-US">Rate time, i.e. the time it applies to.</xs:documentation>
          <xs:documentation xml:lang="is-IS">Tími gengisins, þ.e. hvenær það á við.</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="CurrencyType">
    <xs:annotation>
      <xs:documentation xml:lang="en-US">The currency type used in currencey querys.</xs:documentation>
      <xs:documentation xml:lang="is-IS">Gengistegund sem að spyrjast á fyrir um gengi á.</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="NoteRate" />
      <xs:enumeration value="ExchangeRate" />
      <xs:enumeration value="CustomsRate" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>